package com.keshan.service.impl;

import com.keshan.mapper.RemindToReplyMapper;
import com.keshan.pojo.RemindToReply;
import com.keshan.pojo.RemindToReplyExample;
import com.keshan.service.RemindToReplyServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author keshan
 * @date 2022/10/21 - 15:29
 */
@Service
public class RemindToReplyServicesImpl implements RemindToReplyServices {
    /**
     * @Override
     *     public int insertBySelectiveToFall(Fall fall) {
     *         return fallMapper.insertSelective(fall);
     *     }
     */

    @Autowired
    RemindToReplyMapper remindToReplyMapper;

    @Override
    public int insertBySelectiveToRemindToReply(RemindToReply remindToReply) {
        return remindToReplyMapper.insertSelective(remindToReply);
    }

    @Override
    public List<RemindToReply> getRemindToReplyListByImei(String imei) {
        RemindToReplyExample remindToReplyExample = new RemindToReplyExample();
        RemindToReplyExample.Criteria criteria = remindToReplyExample.createCriteria();
        criteria.andImeiEqualTo(imei);
        return remindToReplyMapper.selectByExample(remindToReplyExample);
    }
}
